package dao;

import data.Author;
import data.User;

public interface AuthorDAO
{
	public static final String TABEL_NAME = "author";
	
	public static final String COLUMN_NAME_USER_ID = "user_id";
	public static final String COLUMN_NAME_PEN_NAME = "pen_name";
	public static final String COLUMN_NAME_COUNT_FANS = "count_fans";
	public static final String COLUMN_NAME_COUNT_WORKS = "count_works";
	public static final String COLUMN_NAME_COUNT_BOOKS = "count_books";
	
	
	
	public Author selectByID(int user_id);
	public Author selectByPenName(String pen_name);
	public Author selectByUser(User user);
	public Author selectByUsername(String username);
	
	public void insert(Author author);
	public void insert(int user_id, String pen_name);
	public void update(Author author);
	public void update(int user_id, String column_name, String value);
	
	
	public boolean isAuthor(int user_id);
	public boolean isAuthor(String username);
	public boolean hasAuthor(String pen_name);
}







